home *** CD-ROM | disk | FTP | other *** search
/ Network Supervisor's Toolkit / Network Supervisor's Toolkit.iso / tools / tsrc29 / chkfrag.doc < prev    next >
Text File  |  1996-07-10  |  2KB  |  47 lines

  1.  
  2. CHKFRAG
  3. Command
  4.  
  5. Bob Flanders and Michael Holmes
  6. August, 1989 (Utilities)
  7.  
  8.  
  9. Purpose:    To report, on-screen, the extent of file fragmentation on a hard
  10. disk, and provide an ERRORLEVEL value usable within a batch file to call a
  11. defragmenting program.  
  12.  
  13. Format:    CHKFRAG [d:] [/% | /N | /E] [/L]
  14.  
  15. Remarks:    Executed without any of its optional parameters, CHKFRAG
  16. produces a screen report indicating the number of files and directories, how
  17. many and what percentage of these are fragmented, and how many extra (non-
  18. contiguously stored) parts of files are contained on the currently-logged drive.
  19. An ERRORLEVEL code from 0-100, reflecting the percentage of fragmented files,
  20. (the /% parameter is the default) is also shown.
  21.  
  22.     An alternative drive (d:) to be analyzed may be specified, as may be
  23. ERRORLEVEL return codes that reflect the actual number of fragmented files (the
  24. /N parameter) or of extra sections (the /E parameter).  The ERRORLEVEL return
  25. codes are not intended for strict accuracy:  if any file is fragmented the
  26. minimum ERRORLEVEL returned by the /% parameter is 1%, and 254 is the maximum
  27. ERRORLEVEL returned by the /N and /E switch options.  These return codes are
  28. intended to be used to trigger automatic loading and execution of the user's
  29. defragmenting utility from within a batch file.  An ERRORLEVEL return code of
  30. 255 is used to indicate an error condition, which halts operation.
  31.  
  32.     If desired, a list of the names of fragmented files and directories can
  33. be produced by specifying the optional /L parameter.  The normal screen output
  34. from CHKFRAG may be redirected to a file or to a printer, for easier analysis.
  35.  
  36.     The DOS CHKDSK command, specified with its /F switch, should be executed
  37. before running CHKFRAG; lost clusters or cross-linked files are interpreted by
  38. CHKFRAG as a error condition.  Drives created with the DOS ASSIGN or SUBST
  39. commands, and directories created by JOIN, are not checked by CHKFRAG.  While
  40. analyzing large disks, the utility requires approximately 100KB of available
  41. RAM.  On-screen recommendations are to consider using a defragmenting utility
  42. when file fragmentation is in the range from 11% to 75%, and definitely to
  43. defragment disks that show more than 75% fragmentation. 
  44.  
  45.     CHKFRAG.EXE was written in the C language and its source code should be
  46. compiled using the Microsoft C Compiler, Version 5.0 or later. 
  47. «MDNM»